<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>动态登录</title>
  <link rel="stylesheet" href="http://at.alicdn.com/t/font_2114279_k1c1t5vu4ml.css">
  <script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.10.0/jquery.min.js"></script>


  <style>
    *{
      font-family: "meontserrat" , sans-serif;
    }
    body{
      margin: 0;
      padding: 0;
      background-color:teal;
    }
    .login-box{
      position: absolute;
      top:0;
      left: -100%;
      width: 100%;
      height: 100vh;
      /* 颜色渐变 */
      background-image: linear-gradient(45deg,#e0c8d1,teal);
      transition: 0.4s;
    }
    .login-form{
      position: absolute;
      top:35%;
      left: 43%;
      transition: translate(-50%,-50%);
      color:whitesmoke;
      text-align: center;
    }
    .txtb{
      display: block;
      box-sizing: border-box;
      width:240px;
      background-color:rgba(198, 198, 236, 0.8);
      outline: none;
      padding: 8px 10px;
      margin: 10px 0;
      border: 1px solid white;
      border-radius: 3px;
      text-align: center;
    }
    .longin-btn{
      width: 240px;
      background: teal;
      border: 0;
      color: white;
      height: 30  px;
      margin-top: -50px;
      padding: 8px 8px;
      border-radius: 3px;
    }
    .hide-login-btn{
      color:#000;
      position: absolute;
      top: 40px;
      right: 40px;
      opacity: .5;
    }
    .show-login-btn{
      position: absolute;
      top: 40%;
      right: 45%;
      transition: translate(-50%,-50%);
      color: whitesmoke;
      border: 2px solid;
      padding: 10px;
    }
    .showed{
      left: 0;
    }
  </style>
</head>
<body>
<div class="show-login-btn">
  <i class="iconfont icon-denglu" ></i>show-login-btn
</div>
<div class="login-box">
  <!-- <img style="width: 100%" src="myIcon\lyf.jpg"/> -->
  <div class="hide-login-btn">
    <i class="iconfont icon-guanbi1" style="font-size: 25px;"></i>
  </div>


  <form action="index-html" method="POST" class="login-form">

    <h1>Welcome!</h1>
    <input class="txtb" type="text" placeholder="username">
    <input class="txtb" type="password" placeholder="password">
    <input class="longin-btn" type="submit" value="Login">
    <!-- <button>登录</button>
    <button id="load" οnclick="window.location.reload('百叶窗.html')">跳转</button> -->
    <h6><a href="百叶窗.html">手机登录</a></h6>
    <h6>还没有账号？<a href="百叶窗.html">此处注册</a></h6>
  </form>
</div>



<script type="text/javascript">
  $(".show-login-btn").on("click",function(){
    $(".login-box").toggleClass("showed")
  });
  $(".hide-login-btn").on("click",function(){
    $(".login-box").toggleClass("showed")
  });
</script>

</body>
</html>